import React from "react";
import { Card, Col, List } from "antd";

export default function CardList(props) {
  return (
    <Col span={8}>
      <Card title={props.title} bordered={true}>
        <List
          size="large"
          dataSource={props.dataSource}
          renderItem={item => (
            <List.Item>
              <a href={`/#/news-manage/preview/${item.id}`}>{item.title}</a>
            </List.Item>
          )}
        />
      </Card>
    </Col>
  );
}
